﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Threading;

namespace CheckOilPrices
{
    public partial class compare : PhoneApplicationPage
    {
        Thread t1;
        MainPage fc = new MainPage();
        public compare()
        {
            InitializeComponent();
			todayTxt.Text=DateTime.Now.ToString("D");
        }


        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            ///////PTT//////
            soline91pttTxt.Text = NavigationContext.QueryString["porg1"]; ;
            dieselpttTxt.Text = NavigationContext.QueryString["porg2"];
            sohol91pttTxt.Text = NavigationContext.QueryString["porg3"];
            sohol95pttTxt.Text = NavigationContext.QueryString["porg5"];
            E20pttTxt.Text = NavigationContext.QueryString["porg4"];
            E85pttTxt.Text = NavigationContext.QueryString["porg6"];
            NGVpttTxt.Text = NavigationContext.QueryString["porg7"];


            ///////BJ///////
            soline91bjTxt.Text = NavigationContext.QueryString["pbjorg7"];
            if (NavigationContext.QueryString["pbjorg1"].Equals(""))
            {
                b5Grid.Visibility = Visibility.Collapsed;
            }
            else
            {
                b5Grid.Visibility = Visibility.Visible;
                B5bjTxt.Text = NavigationContext.QueryString["pbjorg1"];
            }
            Dbjtxt.Text = NavigationContext.QueryString["pbjorg2"];
            sohol91bjTxt.Text = NavigationContext.QueryString["pbjorg5"];
            sohol95bjTxt.Text = NavigationContext.QueryString["pbjorg6"]; 
            E20bjTxt.Text = NavigationContext.QueryString["pbjorg4"];  
            E85bjTxt.Text = NavigationContext.QueryString["pbjorg3"];
            NGVbjTxt.Text = NavigationContext.QueryString["pbjorg8"]; 
        }
    }
}
